home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Free 26
/
Commodore_Free_Issue_26_2009_Commodore_Computer_Club.d64
/
dcn2692 part 2
< prev
next >
Wrap
Text File
|
2023-02-26
|
15KB
|
538 lines
..DCN-2692 floppy controller board
http://www.iki.fi/mkl/dcn2692/
PART 2
ROM types
Atmel FLASH PEROM type AT29C010AP
(128 KBytes) is used here. It is
reprogrammable without extra
programming voltages, and it is
possible to reprogram it in-system.
The ROM socket should also accept
other types of ROMs, including 28-pin
types, which should be inserted
correctly to the 32-pin socket. It
needs to be at least 32 KiloBytes in
size to hold the original ROM content
Ready signal
PC-drives differ from the standard.
One thing missing is the drive ready
signal. Standard drives assert this
signal when the floppy disk is
spinning at a steady speed and is
ready to be read from or written onto
It should take about a half second
after the motor has been turned on.
If it takes too long, the 1581 will
give an error, saying drive not ready
This signal is emulated by R15, R14,
D1, C10, and a buffer in IC10. The
component values were changed between
V0.0.4 and V0.1.0. There is a slim
chance that a PC floppy drive has the
Ready signal somewhere on its circuit
board.
Compatibility with Commodore 1581
This should be compatible. But I had
trouble with cbm4win and my PC;
copying files to dcn-2692 caused the
transfer to hang many times, but this
could have happened because of the
slow transistors I used in the XA1541
adapter. There are known differences,
but I don't know whether these cause
any compatibility issues: The lowest
16 KBytes of SRAM is visible at the
lowest 16 KByte range of the 6502.The
C1581 has 8 KBytes of RAM, and it is
(IIRC) mirrored to 6502 address space
2000..3FFF. The ready signal from the
floppy drive is simulated so,that the
CIA senses the simulated "ready"going
low (=active) about 0.5 seconds after
the CIA drives the "motor" signal of
the floppy drive low (=active.)
Please note that I haven't tested the
board with the C128 fast burst
transfer mode.
CPLD files and download cable
schematic Some of the logic (e.g.
glue logic, etc.) is placed on a
programmable logic chip. CPLD stands
for Complex Programmable Logic Device
Such an IC and can be user programmed
it can be used instead of standard
TTL/CMOS logic ICs,such as 74LS00 etc
The type used with this board is
Lattice Semiconductor
ispLSI1016E-80LJ (where J stands for
PLCC package.) It should also be
possible to use the ispLSI1016 or
ispLSI1016EA version, and any speed
grade will be fast enough. But it is
needed to recompile the ABEL source
for each version of the CPLD.
dcn2.abl ABEL sourcefile for the CPLD
date 20-May-2003 dcn2.jed bitfile
for ispLSI1016E-80LJ download
http://www.students.tut.fi
/{$7e}leinone3/dcn2692/dcn2.jed
MODULE dcn2
TITLE 'dcn2'
"This version is UNFINISHED, but
provides basic functioning for a
1581 clone
"20-May-2003
"Projects on the web at
http://www.iki.fi/mkl
"The target CPLD is Lattice
ispLSI1016-E80LJ, or other PLCC-44
ispLSI1016
"use Slowslew pin attribute when
compiling design
"This ABEL file describes three
functionally separate modules. (In
one file to save(?) trouble)
"1. Logic that replaces various
IEC-bus related logic gates and
buffers in the original CBM-1581
"2. Reset/Clock control logic that
"(i) generates a delayed system reset
to CPU, CIA and WD from master reset
"(ii) generates 2 MHz 6502 CPU clock
PHI0, which MUST be running before
reset is removed
"(iii) generates WD1772 clock, which
is selectable between 8 or 16 MHz
"3. Logic to control chip selects,
output and write enables for RAM,
(e)ROM,CIA,WD
" and manage memory banks of 32
KByte RAM, and ROM (size 32, 64 or
128 KBytes)
" and select the WD clock between
8 or 16 MHz
" and select the floppy drive unit
(Primary / Secondary)
"After master reset the signals are
as follows:
"WD clock is 8 MHz (as in original
1581)
"Primary drive signal is active (low)
The same signal will be high for
secondary drive.
"Lowest 16 KB part of RAM is present
at 6502 address $0000-$3fff
"CIA is visible at $4000-$4fff
(registers at $4000-400f)
"WD is visible at $6000-$6fff
(registers at $6000-6003)
"HIGHEST 32 Kbyte of ROM (PROM, ROM,
EPROM or FLASH) is normally at
$8000-$ffff
"SECOND LOWEST 4 KByte of ROM(ROM
address $1000-1fff) is FIXED at
$5000-$5fff.
"A13 is copied to XA13 (the address
pin on RAM/ROM)
"A14 is copied to XA14 (--""--)
"XA15 and XA16 are set to high
"XA13..XA16 outputs are for memory
bank selection
"The configurable outputs and memory
management get their input from CPU
data line D7
"Address line A12 participates in
selecting the configurable registers
at $7000-$7fff
"The configuration data is fed
SERIALLY from D7 using a special
protocol algorithm.
"^^above function not yet implemented
"------------------------------------
"IEC logic part of design
PIN DECLARATIONS
"IEC is a name for the
Commodore serial bus
DATA{CBM-@}IN pin 22; "inverted IEC{CBM-@}DATA
line state from IEC BUS
"(signal from 74ls14 inverting
schmitt trigger gate)
DATA{CBM-@}OUT pin 19; "output to 7406
inverting open collector driver to
IEC{CBM-@}DATA line
ATN{CBM-@}IN pin 20; "IEC signal...
FCLK{CBM-@}IN pin 21; "IEC signal...
FCLK{CBM-@}OUT pin 18; "IEC signal....
"Note: IEC CLK line logic is not
routed via this CPLD
"Signals from/to CIA
DATAIN{CBM-@}CIA pin 4; "to CIA
DATAOUT{CBM-@}CIA pin 5; "from CIA
ATNIN{CBM-@}CIA pin 39; "to CIA
ATNACK{CBM-@}CIA pin 6; "from CIA
FASTDIR{CBM-@}CIA pin 7; "from CIA
FASTCLK{CBM-@}CIA pin 10; "bi-directional
from/to CIA
FASTDATA{CBM-@}CIA pin 9; "bi-directional
from/to CIA
"-----------------------------------
"-----------------------------------
"Control logic PART pin declarations
"inputs
CLK pin 11;
PHI2 pin 2;
RnW pin 43;
A12 pin 32;
A13 pin 40;
A14 pin 41;
A15 pin 42;
D7 pin 31;
"outputs
PHI0 pin 44;
nRESET pin 3 istype 'reg';
WDCLK pin 16;
nPRIMDRIVE pin 17;
XA13 pin 26;
XA14 pin 28;
XA15 pin 38;
XA16 pin 37;
nWE pin 27;
nOE pin 29;
nCSROM pin 30;
nCSRAM pin 25;
nCSCIA pin 8;
nCSWD pin 15;
"Internal stuff
q7..q0 node istype 'reg';
countteri = [q7..q0]; " set
"---------------------
"------- LOGIC EQUATIONS -------
equations
"IEC logic equations (this part is
asynchronous logic)
ATNIN{CBM-@}CIA = ATN{CBM-@}IN; "the signal is
only passed to another pin on CPLD
DATAIN{CBM-@}CIA = DATA{CBM-@}IN; "same here...
DATA{CBM-@}OUT = DATAOUT{CBM-@}CIA # (ATN{CBM-@}IN &
ATNACK{CBM-@}CIA) # (FASTDIR{CBM-@}CIA &
!FASTDATA{CBM-@}CIA);
"DATA{CBM-@}OUT controlled by many sources
FCLK{CBM-@}OUT =FASTDIR{CBM-@}CIA & !FASTCLK{CBM-@}CIA;
FASTDATA{CBM-@}CIA = (!DATA{CBM-@}IN);
FASTCLK{CBM-@}CIA = (!FCLK{CBM-@}IN);
FASTDATA{CBM-@}CIA.oe = !FASTDIR{CBM-@}CIA;
"when FASTDIR is low, direction is
towards the CIA
FASTCLK{CBM-@}CIA.oe = !FASTDIR{CBM-@}CIA;
"and when high, towards the IEC BUS
buffers.
"Control part equations
"All registers are reset to zero by
the dedicated asynchronous reset
input on the CPLD.
"Therefore, register asynchronous
resets are not explicitly described.
"Clock & Reset output control
countteri.clk = CLK; "clock is 32 MHz
countteri:=countteri.fb+1; "counter
function :-)
PHI0=q3; "4 stages divide the
frequency to 32->16->8->4->2 MHz
nRESET.clk = q7;"asynchronous clock
nRESET:='1'; "set reset 2 inactive hi
"WDCLK selection logic below....
WDCLK=q1;
"simple....
nPRIMDRIVE = '0';
nWE = ! (!RnW & PHI2);
nOE = ! RnW;
when ([A15..A12]==5) then [XA16,XA15,
XA14,XA13] = [0,0,0,0];
else [XA16,XA15,XA14,XA13] =
[1,1,A14,A13]; "ROM banking
"chip selects
nCSROM =! ((A15==1) # ([A15..
A12]==5));" $8000-ffff + $5000-$5fff
nCSRAM =! ([A15,A14]==[0,0]);
"$0000-$3fff
nCSCIA =!([A15..A12]==4);"$4000-$4fff
nCSWD =!(([A15..A12]==6) & PHI2);
"$6000-$6fff, phi2 is involved...
END
Future versions of cpld will have
registers for extra control of ram,
rom and the drive. I have made some
advancement on developing that
functionality,but it is not ready yet
Lattice Semiconductor website
http://www.latticesemi.com/
Download software that programs the
PLD with a .jed bit-file (windblows
pc and perhaps also x86 Linux). They
might ask for registration, etc.
ispLSI download cable
(No guarantee there's no errors, but
it should be almost ok.) You could
use small value (47-100 ohm) series
resistors for signals and a
decoupling capacitor (1-1000 nF)
between VCC and GND.
{CBM-@}{CBM-@}
{CBM-@}iE is short for ispEN
ISP header {CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}74HC367{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@} LPT
1 VCC : ->:(16) VCC : -> 15.
2 SDO : ->:(2) 1A1- 1Y1 (3) : -> 10.
3 SDI : <-:(5) 1Y2- 1A2 (4) : <- 2.
4 {CBM-@}iE : <-:(11) 2Y1- 2A1 (12): <--5.
5 N.C.: : /1OE(1): <-{CBM-H}
6 MODE: <-:(9) 1Y4- 1A4 (10): <- 4.
7 GND :<->:(8) GND : <->GND
8 SCLK:<- :(7) 1Y3- 1A3 (6) : <- 3.
{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}/ : :(14)
: /2OE (15): <->GND
:{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}{CBM-@}/
-< 8 Sense loop back
{$60}-> 12
Images from from isp download cable
pdf (june 2000.) header pins
http://www.students.tut.fi/{$7e}leinone3
/dcn2692/ispdlckuva1.png
http://www.students.tut.fi/{$7e}leinone3
/dcn2692/ispdlckuva2.png
schematic
Image from Lattice isp manual pdf1996
http://www.students.tut.fi/{$7e}leinone3
/dcn2692/ispcable.png
Version history
PCB Version 0.1.2: I had one pce
factory made.
PCB Version 0.1.1: I haven't built
this one. 100 x 100 mm board size.
PCB masks are in a single A4 size
Postscript sheet. All holes are 0.3mm
"drill guide holes",for hand drilling
aide. The schematic is in PNG format.
PCB version 0.1.0: 6 pcs of these
came from a PCB factory. A number of
small changes since 0.0.4,for example
7406 IC is now in DIL-14 package
instead of SMD SOIC-14.
PCB version 0.0.4: This is the same
as version 0.0.2 with updated
documents, eg. component values were
added to the schematic. PCB version
0.0.2: 11 pcs of this board were made
at a PCB factory.
PCB version 0.0.1: First prototype,
PCB etched at home.
About the components, Some notes
Version 0.0.2 is the same as 0.0.4,
but the schematic diagram v0.0.4 is
updated. (It has component values.)
Please note that the BOM (bill of
materials) files are not fully exact
or complete, that means the raw BOMs
are not perfect shopping lists.
The 47 ohm series resistors R10, R11
R17 and R18 are there to protect the
CIA I/O pins from over-current, and
maybe could be omitted and replaced
with solder blobs. The 47 ohm series
resistor R8 and R12 are like source
termination resistors for the clock
lines 32MHz and WDCLK. The value 47
ohm is only a guess, actually a good
value would depend on the impedance
of a transmission line. C1581 also
used ferrite beads in series for
these lines.
The power supply line ferrite bead
(FB1, or L1 in some schematic
versions) should be of a higher
current type than the type used for
small signals. If the ferrite gets
saturated, it doesn't do a good job
in suppressing RF noise leaving or
entering the voltage supply connector
I have not actually made any EMI
measurement if this component here
has any significance, or could it be
replace with something better or a
wire link. The power supply connector
does not appear in the genereated
BOMs in the table.The "correct" type
of 5.25"-drive/3.5"-HDD power input
connector is the one which is
normally mounted the other, and not
the other side of the CDROM/3.5"
-HDD/5.25"-floppydrive PCB. The 4-pin
smaller (2.50 mm pitch) power connect
on the board is not actually the same
type that appears in the BOMs, but
instead the type used with 3.5"floppy
disk drives.An 47 ohm SMD resistor
does not appear in the generated BOMs
Its job is to limit the current in
case there is a short circuit to
ground when plugging in the CPLD
programming cable. (This sometimes
happens with my self built
programming cable,which has the other
row of two row flat cable connector
connected to ground.)
The ispLSI programming connector
header does not appear in the
generated BOMs except for V0.0.4. It
has an 8-pin 0.1" pitch header, where
one no-connection pin can be removed,
and actually should be removed,
starting from V0.1.1. 74VHCT245 has
been used here because its CMOS
sensitivity allows use of small value
(220 nF) capacitor with a larger
value resistor (1.5 Mohm) in the
Ready signal simulator circuit.
Connector "Floppy" is an 34-pin
IDC connector / dual row pin header,
where one pin (number 3) should be
removed.
Bugs
The series base resistor values
(1 kohm) for BC847 npn transistor
values are too small, because the
6526 type CIA typically sources only
about one milliampere. So resistor
values of R19 and R20 should be
increased to 8.2 kohms.26-march-2006
According to datasheets, the 6502
requires voltage swing to full VCC
(=5 volts) at the clock input. But
the ispLSI1016 only outputs about 4
volts at high logic level. The
controller seems to work despite of
that. Diode D2 in ready-signal-
generator-circuit is superfluous and
may be omitted.There is a bug in the
factory made v0.1.0 PCBs It is a
short missing VCC trace between two
pull-up resistors R26 and R27 on the
underside, near IC4(WD1772). The
missing trace is added in these V010
postscript files below (V0.1.0a in
table), so it is a slight bit
different from the factory made ones
in this good way. Copy paste from
BOM-file for v0.1.0: IC7 (74LS14D)
could be replaced with 74F14D, which
have "stronger" outputs, which might
be needed when driving the signals to
two drives on the same cable,instead
of only one drive on the cable.
Usually each drive has 1 kohm pull up
on the signals. For a logic TTL-low,
an input must sense at most 0.8 volts
and that implies also a current. If
there are two drives on a cable, the
combined pull up resistance would be
0.5 kohm, which requires more current
sinking capability from the signal
driver.Usage You may use these
documents to build a board, but you
will responsible that you can build
it safely, and not burn your hand
with a soldering iron and not become
blind with dangerous PCB
manufacturing chemicals etc. And of
course there is no warranty that it
will work, or work reliably.
COMMODORE FREE
I would like to thank Mika Leinonen"
for the permission to reprint this
information in Commodore free
magazine and although Mika no longer
makes the board due to the shortage
of parts especially the very hard to
find WD1772 Chip Here are the notes
Mika sent me about the board
" Hello, I was busy and almost forgot
to answer, but now I do. I haven't
produced more of these, because
WD1772 is very rare. I could make some
boards with socket, where the user
would have to hunt the rare IC.
magazine reprint is ok,"
The item was 85 Euros plus postage,
REAL LIFE USAGE
The board seemed to function without
problems on the many drives I use,
from multiple manufacturers, I didnt
seem to have any compatibility issues
I am sure now with SD card readers
there is less demand for s user to
load items from floppy disk even if
this is a 3.5" drive unit. However at
the time of purchase for me it seemed
the only cheep way to get a Commodore
64 into a PC case and load games from
some device. My Idea was purely a
station to load games and to that end
the device worked well(although slow)
I tested the device with fast loader
carts although they seemed to create
no speed advantage. Alan Shaun & I
tested the unit with geos and wheels,
remembering this unit doesnt have any
form of speedup chip so no jiffy-dos
which is a shame, the unit would
format disks in Geos and wheels and
read from them; but every now and
again would cause both Geos and
wheels to crash unrecoverable.
.....end...